import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home/'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta:{
      isActive:true
    }

  },
  {
    path: '/mine',
    name: 'Mine',
    component: ()=> import('../pages/Mine/'),
    
  },
 
  {
    path: '/shop',
    name: 'Shop',
    component: ()=> import('../pages/Shop/'),
    meta:{
      isActive:true
    }

  },
 
  {
    path: '/search',
    name: 'Search',
    component: ()=> import('../pages/Search/'),
    meta:{
      isActive:true
    }

  },
  {
    path: '/login',
    name: 'Login',
    component: ()=> import('../pages/Login/'),
    meta:{
      nonavibt:true
    }
  },
 
  {
    path: '/goods/:goods',
    name: 'Goods',
    component: ()=> import('../pages/Goods/'),
    
  },
 
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes,
  mode:'history'
})

export default router
